package srk.java.demo.swt1;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

public class Swt_composite_1_4 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setLayout(new RowLayout());
		
		Composite composite = new Composite(shell, SWT.BORDER);
		composite.setLayout(new RowLayout());
		
		Label label = new Label(composite, SWT.HORIZONTAL);
		label.setText("Label insode the Composite");
		
		new Label(composite,SWT.VERTICAL|SWT.SEPARATOR);
		
		Label label1 = new Label(composite, SWT.HORIZONTAL);
		label1.setText("Another Label inside the Composite");

		shell.pack();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.close();
	}

}
